﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace VetumaForSharePoint.Code
{
    /// <summary>
    /// Information to collect at registration
    /// </summary>
    public class DataField : ConfigurationElement
    {
        /// <summary>
        /// Information name (identifier)
        /// </summary>
        [ConfigurationProperty("Name", IsRequired = true, IsKey = true)]
        public string Name
        {
            get
            {
                return this["Name"].ToString();
            }
        }

        /// <summary>
        /// Is this information required 
        /// </summary>
        [ConfigurationProperty("Required", IsRequired = false)]
        public bool Required
        {
            get
            {
                return bool.Parse(this["Required"].ToString());
            }
        }
    }
}
